package com.alex.core.exception;


import org.springframework.http.HttpStatus;

public abstract class StractException extends RuntimeException {
	private static final long serialVersionUID = 1L;

	private  HttpStatus status = HttpStatus.UNAUTHORIZED;

    private  int code = 401;

    private  String errorMsg = "Unauthorized";

    public StractException(HttpStatus status, int code, String errorMsg) {
        this.status = status;
        this.code = code;
        this.errorMsg = errorMsg;
    }

    public StractException(String message, HttpStatus status, int code, String errorMsg) {
        super(message);
        this.status = status;
        this.code = code;
        this.errorMsg = errorMsg;
    }

    public StractException(String message, Throwable cause, HttpStatus status, int code, String errorMsg) {
        super(message, cause);
        this.status = status;
        this.code = code;
        this.errorMsg = errorMsg;
    }

    public StractException(Throwable cause, HttpStatus status, int code, String errorMsg) {
        super(cause);
        this.status = status;
        this.code = code;
        this.errorMsg = errorMsg;
    }

    public StractException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, HttpStatus status, int code, String errorMsg) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.status = status;
        this.code = code;
        this.errorMsg = errorMsg;
    }
}
